program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x, y, n, n0, t: real;
  i, j: integer;
begin
  randomize;
  n0:=0;
  n:=0;
  for i:=1 to 1000000 do
  begin
    for j:=1 to 1000 do
    begin
      x:=2*random;
      y:=2*random;
      if ((x-1)*(x-1)+(y-1)*(y-1)<=1) then
      begin
        n0:=n0+1;
      end;
      n:=n+1;
    end;
    t:=(4*n0/n);
    writeln(t);
  end;
  readln;
end.
 